package com.example.AsynTask;

import android.os.AsyncTask;
import android.util.Log;

/**
 * Created by usernamee on 2017/7/17.
 */

public class MyAsynTask extends AsyncTask<Void,Void,Void> {

/*
调用方法的顺序
*D /TAG: onPreExecute
D/TAG: doInBackground
D/TAG: onPostExecute
* */

    @Override
    protected Void doInBackground(Void... params) {
        Log.d("TAG","doInBackground");
        publishProgress();
        return null;
    }


    @Override
    protected void onPreExecute() {
        Log.d("TAG","onPreExecute");
        super.onPreExecute();
    }


    @Override
    protected void onPostExecute(Void aVoid) {
        Log.d("TAG","onPostExecute");
        super.onPostExecute(aVoid);
    }


    @Override
    protected void onProgressUpdate(Void... values) {
        Log.d("TAG","onProgressUpdate");
        super.onProgressUpdate(values);
    }
}
